package ua.at.javac.entity;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "period")
public class Period implements Serializable {

	private static final long serialVersionUID = 1L;

	Period(){
	}

	@Id
	@Column(name="period_id")
	@GeneratedValue(strategy=GenerationType.IDENTITY)	
	private Long id;
	
	@Column(name="period")
	private String period;
	
	@Column(name="name",length=10)
	private String name;

	@OneToMany(mappedBy="period")
	private Set <Journal> journal;

}
